package com.poi.util;

import com.poi.exp.context.PoiExporterContext;

/**
 * poi 上下文帮助类
 * 
 * @author tarena
 *
 */
public class PoiContextUtil {
	/** 获取当前线程内上下文环境 **/
	private static ThreadLocal<PoiExporterContext> connThreadLocal = new ThreadLocal<>();

	public static ThreadLocal<PoiExporterContext> getConnThreadLocal() {
		return connThreadLocal;
	}

	public static void setConnThreadLocal(ThreadLocal<PoiExporterContext> connThreadLocal) {
		PoiContextUtil.connThreadLocal = connThreadLocal;
	}

	public static PoiExporterContext getContext() {
		return connThreadLocal.get();
	}

	public static void setContext(PoiExporterContext poiContext) {
		 connThreadLocal.set(poiContext);
	}
}
